// 

function Person(name,age,sex){
    this.name = name;
    this.age = age;
    this.sex = sex;
}
function Student(name,age,sex){
    var _this = this;
    _this.name = name;
    _this.age = age;
    _this.sex = sex;    
    return _this;
}

var p1 = new Person('周圣',18,'男');
var p2 = new Student('张三',18,'男');
console.log(p1); // Person { name: '周圣', age: 18, sex: '男' }
console.log(p2); // Student { name: '张三', age: 18, sex: '男' }